kriticke sekce z delphi do c
Otázka od: Matejcek Petr
24. 5. 2004 11:26
DD,
poradil by pls nekdo jak z delphi prepsat tyto casti kodu pod c++
builder ?
var KritickaSekce: TCriticalSection;
KritickaSekce := TCriticalSection.Create;
KritickaSekce.Free;
v helpu je pouze KritickaSekce->Acquire(); a KritickaSekce->Release();
diky PM
Odpovedá: Blazek Jaroslav
24. 5. 2004 13:37
Ahoj,
> konference@crhov.komfi.cz 24.5.2004 12:26:13 >>>
>poradil by pls nekdo jak z delphi prepsat tyto casti kodu pod c++
builder ?
>var KritickaSekce: TCriticalSection;
> KritickaSekce := TCriticalSection.Create;
> KritickaSekce.Free;
>v helpu je pouze KritickaSekce->Acquire(); a
KritickaSekce->Release();
TCriticalSection *KritickaSekce = new TCriticalSection();
try
{
...
}
__finally
{
delete KritickaSekce;
}
nebo jeste lepe
#include <SyncObjs.hpp>
#include <memory>
using namespace std;
auto_ptr<TCriticalSection>KritickaSekce(new TCriticalSection());
S pozdravem
Bc. Jaroslav Blazek
Access-IT Ceska Lipa
mailto:jaroslav.blazek@access-it.cz
http://www.access-it.cz
ICQ# : 133673990
+420605/813644